import request from '@/utils/request'

// 查询商品出库列表
export function listOutStore(query) {
  return request({
    url: '/crm/outStore/list',
    method: 'get',
    params: query
  })
}

// 查询商品出库详细
export function getOutStore(id) {
  return request({
    url: '/crm/outStore/' + id,
    method: 'get'
  })
}

// 提交审批
export function submitAuditor(id) {
  return request({
    url: '/crm/outStore/submitAuditor?id=' + id,
    method: 'get'
  })
}

// 审批出库
export function doAuditor(data) {
  return request({
    url: '/crm/outStore/doAuditor',
    method: 'post',
    data: data
  })
}

// 新增商品出库
export function addOutStore(data) {
  return request({
    url: '/crm/outStore',
    method: 'post',
    data: data
  })
}

// 修改商品出库
export function updateOutStore(data) {
  return request({
    url: '/crm/outStore',
    method: 'put',
    data: data
  })
}

// 删除商品出库
export function delOutStore(id) {
  return request({
    url: '/crm/outStore/' + id,
    method: 'delete'
  })
}
